Skip to content

fix(sécurité) : identifiants validés avant tout appel (0.7.1) - #15

Merged
JIV-DLS merged 1 commit into
mainfrom
securite/identifiants
Nov 16, 2026
Merged

JIV-DLS merged 1 commit into
mainfrom
securite/identifiants

Conversation

@JIV-DLS

@JIV-DLS JIV-DLS commented Nov 16, 2026

Copy link
Copy Markdown
Member

Un identifiant mis dans un chemin d'URL (get_payment, cancel_payment, refund, record_external_refund, get_refund, simulate_test_payment, sync et async) doit correspondre à ^[A-Za-z0-9_-]{1,128}$. Sinon : invalid_request (statut 0, non rejouable), aucun appel, message sans la valeur reçue.

Avant, get_payment("../balance") partait en GET /v1/payments/..%2Fbalance avec la clé du marchand : un proxy qui décode %2F puis normalise le chemin l'enverrait vers /v1/balance.

Routes toutes faites : identifiant de paiement hors motif → 404 payment_not_found, orderId hors motif → 404 order_not_found, sans appel. Contrat partagé inchangé (31 cas, verts).

Tests : ../balance, .., ., a/b, a%2Fb, chaîne vide, pay 1, retour à la ligne final, 129 caractères, non-chaîne → refusés sans appel ; pay_1, UUID, 128 caractères → partent tels quels.

Un identifiant mis dans un chemin d'URL doit correspondre à ^[A-Za-z0-9_-]{1,128}$ ; sinon
invalid_request (statut 0, non rejouable), sans appel et sans citer la valeur. Avant,
get_payment("../balance") partait en /v1/payments/..%2Fbalance avec la clé du marchand.
Routes toutes faites : identifiant de paiement hors motif → 404 payment_not_found,
orderId hors motif → 404 order_not_found, sans appel.
@JIV-DLS
JIV-DLS merged commit d564360 into main Nov 16, 2026
2 checks passed
@JIV-DLS
JIV-DLS deleted the securite/identifiants branch November 16, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant